import { createRouter, createWebHistory } from 'vue-router';

// 导入组件
const routes = [
  {
    path:'/',
    redirect:'/home'
  },
 {
  path:'/home',
  name: 'home',
  component: () => import('@/views/home.vue'),
  // children: [
  //   {
  //     path: 'suggestion',
  //     name: 'suggestion',
  //     component:() => import('@/views/pages/suggestion.vue')
  //   }
  // ]
 },
 {
  path: '/message',
  name: 'message',
  component:() => import('@/views/message.vue')
 },
 {
  path: '/me',
  name: 'me',
  component:() => import('@/views/me.vue')
 },
 {
  path: '/picture',
  name: 'picture',
  component:() => import('@/views/showpage/picture.vue')
 },
 {
  path: '/shoes',
  name: 'shoes',
  component:() => import('@/views/3D/shoes.vue')
 },
 {
  path: '/search',
  name: 'search',
  component:() => import('@/views/search.vue')
 },
 {
  path: '/chat',
  name: 'chat',
  component:() => import('@/views/chat.vue')
 },
 {
  path: '/createPage', 
  name: 'createPage',
  component:() => import('@/views/createPage.vue')
 },
 {
  path: '/setPage', 
  name: 'setPage',
  component:() => import('@/views/setPage.vue')
 },
 {
  path: '/loginPage', 
  name: 'loginPage',
  component:() => import('@/views/loginPage.vue')
 },

]

// 创建路由实例
const router = createRouter({
  history: createWebHistory(),
  routes
});

// 导出路由实例
export default router;